#include <algorithm>
#include <iostream>
#include <vector>
#define LL long long
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int n;
    LL ans = 0;
    vector<int> odda;

    cin >> n;
    for (int i = 0; i < n; i++) {
      int a;

      cin >> a;
      if (a & 1) {
        odda.push_back(a);
      } else {
        ans += a;
      }
    }
    if (odda.empty()) {
      ans = 0;
    } else {
      sort(odda.begin(), odda.end());
      for (int i = odda.size() - odda.size() / 2, j = odda.size() - 1; i > 0; i--, j--) {
        ans += odda[j];
      }
    }
    cout << ans << "\n";
  }
  return 0;
}